{extend name='common/content' /}

{block name="button"}
<div class="nowrap pull-right" style="margin-top:10px">
    <button data-modal='{:url("$classuri/add")}' data-title="添加分类" class='layui-btn layui-btn-small'><i class='fa fa-plus'></i> 添加分类</button>
</div>
{/block}


{block name="content"}

<form onsubmit="return false;" data-auto="" method="POST">
    <input type="hidden" value="resort" name="action"/>
    <table class="table table-hover">
        <thead>
            <tr>
                <th class='list-table-sort-td'>
                    <button type="submit" class="layui-btn layui-btn-normal layui-btn-mini">排 序</button>
                </th>
                <th class='text-center'>分类名称</th>
                <th class='text-center'>操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach $list as $key=>$v}
            <tr>
                <td class='list-table-sort-td'>
                    <input name="_{$v.sc_id}" value="{$v.sc_sort}" class="list-sort-input"/>
                </td>
                <td class='text-center'>{$v.sc_name}</td>
                <td class='text-center nowrap'>
                    <div class="layui-btn-group">
                    		{if auth("$classuri/edit")}
                    		<button type="button" data-modal='{:url("$classuri/edit")}?sc_id={$v.sc_id}' class="layui-btn layui-btn-primary layui-btn-small"><i class="layui-icon"></i></button>
          							{/if}
                    	
                    		{if auth("$classuri/del")}
                    		<a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:if(confirm('删除后将不能恢复，确认删除吗？'))window.location = '/admin/storeclass/store_class_del?sc_id=<?php echo $v['sc_id'];?>';"><i class="layui-icon"></i></a>
                    		{/if}
                    </div>
                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>
</form>
{/block}